package oop.day01;

class Person
{
    int p;
    String name;
    int age;
    String address;
    Person()
    {}
    Person(String name,int age,String address)
    {
        this.name = name;
        this.age = age;
        this.address = address;
    }
    void say()
    {
        System.out.println(name + "Person say....");
    }

}


class Student extends Person
{
    int p;
    String className;
    String no;
    double score;
    String grade;
    Student() {};
    Student(String name,String address,String className,String no,double score, String grade,int age)
    {
        super(name,age,address);
        this.className = className;
        this.no = no;
        this.score = score;
        this.grade = grade;
        this.p = 11;
        super.p = 22;
        System.out.println(this.p);
        System.out.println(super.p);
        System.out.println("here is a constructor with six arguments");
    }

    void task()
    {
        System.out.println(name+"is tasking .....");
    }

}

class Nurse extends Person
{
    int no;
    //            "zh",    24,    "邢台市信都区钢铁大道", 1
    Nurse(String name,int age,String address,int no)
    {
        //"zh",     24,   "邢台市信都区钢铁大道"
        super(name,age,address);
        this.no = no;
        System.out.println("hope you happiness");
    }
    void service()
    {
        System.out.println(name + "is servicing .....");
    }
}

class Doctor extends Person
{
    String title;

    Doctor(){};

    Doctor(String name, int age, String address, String title)
    {
        super(name,age,address);
        this.title = title;
    }
    void cut()
    {
        System.out.println(this.name+"is cutting");
    }
}